package com.network;

import com.xingjibase.params.*
import io.reactivex.Observable
import okhttp3.ResponseBody
import retrofit2.http.*


/**
 * 一般请求服务
 */
interface ServiceToRequest {
    /**
     * 验证用户是否存在
     */
    @Headers(URL_INFO_KEY)
    @POST("sys/user-exists")
    fun verifyn(@Body verifynParams: PartForVerify): Observable<ResponseBody?>?

    /**
     * 登录
     */
    @Headers(URL_INFO_KEY)
    @POST("sys/signin-pwd")
    fun login(@Body loginParams: PartForLogin): Observable<ResponseBody?>?

    /**
     * 获取地锁列表
     */
    @POST("latch/list")
    fun lockList(@Query("s") sessionId: String?): Observable<ResponseBody?>?

    /**
     * 设置地锁名称
     */
    @POST("latch/set")
    fun lockSet(@Body setLock: PartForSetLock): Observable<ResponseBody?>?

    /**
     * 获取用户基本信息
     */
    @POST("usr/get")
    fun userInfo(@Query("s") sessionId: String?): Observable<ResponseBody?>?

    /**
     * 设置为默认地锁
     */
    @POST("latch/set-default")
    fun defaultLock(@Body mParams: DefaultLockParams): Observable<ResponseBody?>?

    /**
     * 刷新登录状态
     */
    @POST("usr/refresh")
    fun refreshStatus(@Query("s") sessionId: String?): Observable<ResponseBody?>?

    /**
     * 删除地锁
     */
    @POST("latch/del")
    fun deleteLock(@Body mParams: DefaultLockParams): Observable<ResponseBody?>?

    /**
     * 添加地锁
     */
    @POST("latch/add")
    fun addLock(@Body params: LockAddParams): Observable<ResponseBody?>?

    /**
     * 查询地锁数据
     */
    @POST("latch/get")
    fun checkId(@Body loginParams: PartForCheckId): Observable<ResponseBody?>?

    /**
     * 获取验证码
     */
    @GET("/doctor/login/getCode")
    fun code(@Query("phone") code: String?): Observable<ResponseBody?>?

    /**
     * 查询二级医师职称
     */
    @GET("/doctor/message/queryDoctorRanks")
    fun departmentLevel(): Observable<ResponseBody?>?
}